/**
 * Zhznet.com Inc.
 * Copyright (c) 2004-2012 All Rights Reserved.
 */
package com.ceicei.taobaoke.api.yonghu;

import com.ceicei.util.CeiceiConstants;
import com.taobao.api.ApiException;
import com.taobao.api.DefaultTaobaoClient;
import com.taobao.api.TaobaoClient;
import com.taobao.api.request.UserGetRequest;
import com.taobao.api.response.UserGetResponse;

/**
 *
 * @author 李威-liwei2672@gmail.com
 * @version $Id: UserGetTest.java, v 0.1 2012-4-18 下午04:05:07 李威 Exp $
 */
public class UserGetTest {
    public void test() {

        TaobaoClient client = new DefaultTaobaoClient(CeiceiConstants.url, "test", "test");
        UserGetRequest req = new UserGetRequest();
        req.setFields("user_id,nick,seller_credit");
        req.setNick("alipublic02");
        UserGetResponse response;
        try {
            response = client.execute(req);
            System.out.println(response.getBody());
        } catch (ApiException e) {
            System.out.println("Get client fail");
            e.printStackTrace();
        }
    }

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        UserGetTest user = new UserGetTest();
        user.test();
        return;
    }

}
